Error bounded multiplication by invariant rationals

ABSTRACT

A hardware logic representation of a circuit to implement an operation to perform multiplication by an invariant rational is generated by truncating an infinite single summation array (which is represented in a finite way). The truncation is performed by identifying a repeating section and then discarding all but a finite number of the repeating sections whilst still satisfying a defined error bound. To further reduce the size of the summation array, the binary representation of the invariant rational is converted into canonical signed digit notation prior to creating the finite representation of the infinite array.

CROSS-REFERENCE TO RELATED APPLICATIONS AND CLAIM OF PRIORITY

This application is a continuation under 35 U.S.C. 120 of copendingapplication Ser. No. 16/796,786 filed Feb. 20, 2020, which is acontinuation of prior application Ser. No. 16/388,177 filed Apr. 18,2019, now U.S. Pat. No. 10,606,588, which is a continuation of priorapplication Ser. No. 15/633,883 filed Jun. 27, 2017, now U.S. Pat. No.10,310,816, which claims foreign priority under 35 U.S.C. 119 fromUnited Kingdom Application No. 1611156.9 filed Jun. 27, 2016.

BACKGROUND

When designing integrated circuits, logic is often required to performaddition, subtraction, multiplication and division. Whilst addition,subtraction and multiplication operations can all be cheaply implemented(e.g. in terms of area of logic required) in hardware, divisionoperations are acknowledged to be an expensive operation to implement inhardware.

In the case that the divisor is known to be a constant at design-time, adivision operation can be expressed as multiplication by a constantfraction (also referred to as an ‘invariant rational’) and it ispossible to construct efficient implementations of the divisionoperation using a combination of addition and constant multiplicationlogic. This can simplify the logic significantly and hence reduce thearea of integrated circuit needed to implement the division operation.

In various examples, the result from a division operation need not becalculated accurately but instead the result can be rounded to thenearest integer or otherwise approximated; however, in many examples,the error, ε, in the result (as defined as the difference between theaccurate result R and the result generated R′) needs to satisfy an errorbound, ε_(max), i.e.ε=R−R′|ε|≤ε_(max)This approximate calculation of a division operation may be referred toas ‘lossy constant division’.

The embodiments described below are provided by way of example only andare not limiting of implementations which solve any or all of thedisadvantages of known methods and hardware for implementing lossyconstant division.

SUMMARY

This Summary is provided to introduce a selection of concepts in asimplified form that are further described below in the DetailedDescription. This Summary is not intended to identify key features oressential features of the claimed subject matter, nor is it intended tobe used to limit the scope of the claimed subject matter.

A hardware logic representation of a circuit to implement an operationto perform multiplication by an invariant rational is generated bytruncating an infinite single summation array (which is represented in afinite way). The truncation is performed by identifying a repeatingsection and then discarding all but a finite number of the repeatingsections whilst still satisfying a defined error bound. To furtherreduce the size of the summation array, the binary representation of theinvariant rational is converted into canonical signed digit notationprior to creating the finite representation of the infinite array.

A first aspect provides a method of generating a hardware logicimplementation of an operation to multiply an input value by apredetermined invariant rational that satisfies a defined error bound,the method comprising: in response to determining that a binaryexpansion of the predetermined invariant rational comprises two adjacentnon-zero bits, in a synthesizer module, truncating the binary expansion,converting the truncated binary expansion into canonical signed digitnotation and expanding the canonical signed digit representation into afinite representation of an infinite expansion; generating, in thesynthesizer module, a truncated single summation array from the infiniteexpansion by discarding one or more repeating sections of the arraybased upon the defined error bound; and generating, in the synthesizermodule, a hardware representation implementing the truncated singlesummation array, wherein the generated hardware representation is thehardware logic implementation of an operation to multiply an input valueby the predetermined invariant rational that satisfies the defined errorbound.

A second aspect provides an apparatus configured to perform lossysynthesis of a an operation to multiply an input value by apredetermined invariant rational that satisfies a defined error boundand generate a hardware logic implementation of the operation, theapparatus comprising: a processor; and a memory comprising computerexecutable instructions which, when executed, cause the processor: inresponse to determining that a binary expansion of the predeterminedinvariant rational comprises two adjacent non-zero bits, to truncate thebinary expansion, convert the truncated binary expansion into canonicalsigned digit notation and expand the canonical signed digitrepresentation into a finite representation of an infinite expansion; togenerate a truncated single summation array from the infinite expansionby discarding one or more repeating sections of the array based upon thedefined error bound; and to generate a hardware representationimplementing the truncated single summation array, wherein the generatedhardware representation is the hardware logic implementation of anoperation to multiply an input value by the predetermined invariantrational that satisfies the defined error bound.

The hardware logic implementation generated by the method describedherein may be embodied in hardware on an integrated circuit. There maybe provided a method of manufacturing, at an integrated circuitmanufacturing system, the hardware logic implementation. There may beprovided an integrated circuit definition dataset that, when processedin an integrated circuit manufacturing system, configures the system tomanufacture the hardware logic implementation. There may be provided anon-transitory computer readable storage medium having stored thereon acomputer readable description of an integrated circuit that, whenprocessed, causes a layout processing system to generate a circuitlayout description used in an integrated circuit manufacturing system tomanufacture the hardware logic implementation.

There may be provided an integrated circuit manufacturing systemcomprising: a non-transitory computer readable storage medium havingstored thereon a computer readable integrated circuit description thatdescribes the hardware logic implementation; a layout processing systemconfigured to process the integrated circuit description so as togenerate a circuit layout description of an integrated circuit embodyingthe hardware logic implementation; and an integrated circuit generationsystem configured to manufacture the hardware logic implementationaccording to the circuit layout description.

There may be provided computer program code for performing a method asdescribed herein. There may be provided non-transitory computer readablestorage medium having stored thereon computer readable instructionsthat, when executed at a computer system, cause the computer system toperform the method as described herein.

The preferred features may be combined as appropriate, as would beapparent to a skilled person, and may be combined with any of theaspects of the invention.

BRIEF DESCRIPTION OF THE DRAWINGS

Embodiments of the invention will be described in detail with referenceto the accompanying drawings in which:

FIG. 1 is a schematic diagram of a lossy synthesizer;

FIG. 2 shows an example data-flow graph;

FIG. 3 is a flow diagram of an example method of operation of the lossysynthesizer shown in FIG. 1 ;

FIG. 4 is a graphical representation of elements of the method of FIG. 3;

FIG. 5 is a further graphical representation of elements of the methodof FIG. 3 ;

FIG. 6 is another graphical representation of elements of the method ofFIG. 3 ;

FIG. 7 is a schematic diagram of an example computing device which maybe configured to implement the methods described herein; and

FIG. 8 shows an integrated circuit manufacturing system for generatingan integrated circuit comprising hardware implementing multiplication bya predetermined invariant rational.

The accompanying drawings illustrate various examples. The skilledperson will appreciate that the illustrated element boundaries (e.g.,boxes, groups of boxes, or other shapes) in the drawings represent oneexample of the boundaries. It may be that in some examples, one elementmay be designed as multiple elements or that multiple elements may bedesigned as one element. Common reference numerals are used throughoutthe figures, where appropriate, to indicate similar features.

DETAILED DESCRIPTION

Embodiments of the present invention are described below by way ofexample only. These examples represent the best ways of putting theinvention into practice that are currently known to the Applicantalthough they are not the only ways in which this could be achieved. Thedescription sets forth the functions of the example and the sequence ofsteps for constructing and operating the example. However, the same orequivalent functions and sequences may be accomplished by differentexamples.

Described herein are methods for implementing multiplication byinvariant rationals in hardware logic. The methods described reduceresource usage (e.g. area of hardware that is required) whilst providinga guaranteed bounded error. As described above, constant division is oneexample of multiplication by an invariant rational. In the methodsdescribed, the multiplication by an invariant rational is not evaluatedto infinite precision but instead the methods enable exploitation of amaximum absolute error (which may be user defined) and so may bedescribed as lossy.

Filters typically require the implementation of fixed-point polynomialswith rational coefficients. Such a polynomial can be represented as adata-flow graph (DFG) with nodes that are either arithmeticsum-of-products (SOPs) or constant division operators. The methods forimplementing multiplication by invariant rationals in hardware logicdescribed herein and the resulting hardware logic can be used in afixed-point filter as a constant division node. The total permissibleerror in the implementation of the polynomial may be divided intoportions such that separate error bounds are allocated to each node inthe DFG and hence this error bound allocated to a node may be used whendetermining the hardware logic to implement a constant divisionoperation (i.e. the implementation of multiplication by an invariantrational).

FIG. 1 is a schematic diagram of an example synthesizer (or synthesizermodule) 100 which may implement the methods described herein. As shownin FIG. 1 , the synthesizer 100 takes as input 102 an invariant rationalwhich may take the form 1/d or P/Q, where d is a positive, odd integergreater than one (i.e. d=2θ+1, where θ>0), P and Q which can be assumedto be coprime integers without loss of generality and Q is not a powerof two. The synthesizer also takes as input 103 an input n describingthe number of bits of x which will be multiplied by 1/d or P/Q (i.e. thebit width of x). An error specification 104 is also provided whichprovides a user bounded error (i.e. a maximum absolute error tolerance).The output 106 of the synthesizer 100 is a hardware representation ofthe binary logic circuit (e.g. in the form of RTL, a higher levelcircuit representation such as Verilog™ or VHDL or a lower levelrepresentation such as OASIS or GDSII) that is guaranteed to meet theerror specification 104 and is suitable for datapath logic synthesis. Atypical user requirement is that the result should be correct to theunit in the last place and this can be translated into an absolute errorbound of the form |ε|≤2^(p) where p is an integer. More generally,|ε|≤u2^(p) where u>1/2 and both u and p are provided as an input 104 tothe synthesizer 100. The binary logic circuit (corresponding to thehardware 106) takes an input value, x, and generates an output of x/d orPx/Q, where x is an integer variable between 0 and integer M.

As described above, the hardware representation 106 generated by thelossy synthesizer 100 may be part of the hardware representation of afilter (which implements a polynomial) and so the lossy synthesizer 100may be part of a larger synthesizer 110. This lossy polynomialsynthesizer 110 takes as input 112 a polynomial with rationalcoefficients and fixed-point inputs and outputs. An error specification114 is also provided which provides a user bounded error (i.e. a maximumabsolute error tolerance) and the error bound 104 used by the lossysynthesizer 100 is a part of the user bounded error 114. The lossypolynomial synthesizer 110 may provide the value of E, the acceptablemaximum absolute error tolerance, by providing p (the output precision),and u (the number of units in the last place of accuracy) to the lossysynthesizer 100. The output 116 of the lossy polynomial synthesizer 110is a hardware representation of the binary logic circuit (e.g. in theform of RTL, a higher level circuit representation such as Verilog™ orVHDL or a lower level representation such as OASIS or GDSII) that isguaranteed to meet the error specification 104 and is suitable fordatapath logic synthesis. A typical user requirement is again that theresult should be correct to the unit in the last place and this can betranslated into an absolute error bound.

The input 112 to the lossy polynomial synthesizer 110 is a fixed-pointpolynomial with rational coefficients, L, for example:

$\begin{matrix}{L = \frac{a + {2b} + {2c} + d}{6}} & (1)\end{matrix}$Without loss of generality, the polynomial may be written as apolynomial with integer constants and rational coefficients, for exampleof the following form for an appropriate value of r:

$\begin{matrix}{L = \frac{\alpha + {2\beta} + {2\gamma} + \delta}{6*2^{r}}} & (2)\end{matrix}$

The binary logic circuit (corresponding to the hardware 116) takes inputvalues, α, β, γ & δ and could generate output that produces anintermediate value x, as follows:

$\begin{matrix}{{x = {\alpha + {2\beta} + {2\gamma} + \delta}}{L = \frac{x}{6*2^{r}}}} & (3)\end{matrix}$

The polynomial, L, that is input to the lossy synthesizer 110, may berepresented as a DFG 200, as shown in FIG. 2 , with nodes that areeither arithmetic sum-of-products (SOPs) 202 or constant divisionoperators 204 (block 302) and as described above, the maximum error forthe polynomial 114 can be divided up and parts of this maximum error 114allocated to each of the nodes 202, 204. The lossy synthesizer 100 maybe used to generate the hardware implementation of the constant divisionnode 204 taking as input the error bound 104 allocated to that node.

FIG. 3 is a flow diagram of an example method of operation of the lossysynthesizer 100, which will initially be described with reference to aninvariant rational of the form 1/d and hence the method generates ahardware implementation of a binary circuit which takes an input x andperforms the operation x/d. As noted above, d is a positive, odd integergreater than one. Initially it is assumed that x is an unsigned binarynumber; however, subsequent description explains the method where x is asigned binary number. Similarly, the method is subsequently describedfor an invariant rational of the form P/Q.

The method comprises truncation of an infinite array (which isrepresented in a finite way), the inclusion of a constant and a furthertruncation to the desired output precision, p. More precisely, theimplementation y′, when compared to the infinitely precise answer y willbe:

$y^{\prime} = {2^{p}\left\lfloor \frac{y - \Delta + C}{2^{p}} \right\rfloor}$where Δ are the bits removed from the infinite array and C is an addedconstant (which is added in to compensate for the removed bits, asdescribed below).

Whilst the method described herein refers to creating and truncating aninfinite array, it will be appreciated that a finite representation ofthe infinite array is actually formed (e.g. by reference to a repeatingsection).

The absolute error between y and y′ is:

${ɛ} = {{{y - y^{\prime}}} = {{{y - {2^{p}\left\lfloor \frac{y - \Delta + C}{2^{p}} \right\rfloor}}} = {{{\left( {y - \Delta + C} \right){{mod}2}^{p}} + \Delta - C}}}}$

For this to be acceptable in magnitude:|ε|≤u2^(p)−u2^(p)≤(y−Δ+C)mod 2^(p) +Δ−C≤u2^(p)

Now the lower bound is most stressed when both the mod term and Δ are 0:−u2^(p) ≤−C

The upper bound is most stressed when the mod term and A are maximal:2^(p)+Δ_(max) −C≤u2^(p)

These equations are satisfied and give the greatest freedom to A if C ischosen to be as large as possible:C=u2^(p)andΔ_(max)≤(2u−1)2^(p)

As shown in FIG. 3 , the method comprises generating (or taking as aninput) the value of the invariant rational (e.g. 1/d) in binary (block302). As the invariant rational can be expressed as:

$\begin{matrix}{\frac{1}{d} = {\left( \frac{B}{2^{m} - 1} \right) = {B\left( {2^{- m} + 2^{{- 2}m} + \ldots} \right)}}} & (4)\end{matrix}$where m is a positive integer and B is an integer in the range[0,2^(m)−2]. Depending upon the value of d (which is a positive, oddinteger), 1/d is a recurring expansion 404 with a repeating portion B,as shown graphically in the upper part of FIG. 4 .

For example, if d=7, then 1/7 in binary is:

0.00100100100100100100100100100100100100100100100100100100100100 . . .

and it can be seen that after the radix point there is a repeatingsection ‘001’:

0.001|001|001| . . . .

Similarly for d=21, 1/21 in binary is:

0.000011000011000011000011000011000011000011000011000011000011 00 . . .

and it can be seen that after the radix point there is a repeatingsection

‘000011’:

0.000011|000011|000011| . . . .

Similarly for d=49, 1/49 in binary is:

0.000001010011100101111000001010011100101111000001010011100101111 . . .

and it can be seen that after the radix point there is a repeatingsection

‘000001010011100101111’:

0.000001010011100101111|000001010011100101111| . . .

A single summation array (which may also be referred to as a binaryarray) could then be formed using the binary representation of 1/d. Asummation array for a node is an array formed from all of the partialproducts corresponding to the operator (e.g. a constant division or SOPoperator), e.g. which implements equation (4) above. However, to reducethe size of the single summation array (which produces area, delay andpower benefits in the resultant hardware) for binary representationscomprising adjacent non-zero bits (‘Yes’ in block 304), the binaryrepresentation may first be converted into canonical signed digitrepresentation (CSD) in which each bit can be a 1, 0 or −1 (shown as 1)and in which no two adjacent bits are non-zero (block 308). In the eventthat the binary representation does not comprise adjacent non-zero bits(‘No’ in block 304), the CSD conversion may be omitted because the CSDrepresentation is the same as the binary representation. Alternatively,CSD may always be performed (as indicated by the dotted arrow from block302 to block 306) and for binary representations (which may also bereferred to as binary expansions) with no adjacent ones, the CSDoperation (in block 308) will leave the representation unchanged.

The algorithms for converting a binary representation to CSD operate ona finite binary number and as described above, if d is an odd number,1/d in binary is not terminating (and hence is not finite in terms ofthe number of bits required) but is instead a recurring expansion.Consequently, in the event that CSD is to be used (in block 308), thebinary representation (from block 302) is first truncated (block 306)before the truncated binary representation is converted into CSD (inblock 308).

The truncation (in block 306) involves taking all the bits from aplurality of complete repeating sections (e.g. 2 repeating sections) andone extra bit from the next section (when working from left to right),as shown by bracket 406 in FIG. 4 . Referring to the examples above, thetruncation may for example comprise, for d=21, truncating:

0.000011000011000011000011000011000011000011000011000011000011 00 . . .

to be:

0.0000110000110

and for d=49, truncating:

0.000001010011100101111000001010011100101111000001010011100101 111 . . .

0.0000010100111001011110000010100111001011110

Taking the example with d=21, if binary representation:

0.0000110000110

is converted into CSD notation, this becomes:

0.0001010001010

which has a repeating section: 000101 which is the same length as therepeating section prior to conversion into CSD notation.

Taking the example with d=49, if binary representation:

0.0000010100111001011110000010100111001011110

is converted into CSD notation, this becomes:

0.0000010101001010100010000010101001010100010

which has a repeating section: 000001010100101010001 which is again thesame length as the repeating section prior to conversion into CSDnotation.

Having converted the truncated representation into CSD (in block 308),the resulting CSD representation also comprises a recurring portion andthis recurring portion is the same length (i.e. comprises the samenumber of bits) as the recurring portion in the binary representation,as shown in the examples above, and so the CSD representation can thenbe extended to form an infinite CSD representation by repeating thisrecurring portion (block 310).

A single summation array is then created from the infinite CSDrepresentation (block 311) and as the representation is infinite, thecomplete array is also infinite. This summation array (created in block311) however, also comprises a repeating portion 501 and the portion hasa length of m bits (where this number of bits, m, is the same as thenumber of bits in the recurring sections in the CSD representation andthe binary representation). Part of an example infinite array 500 ford=21 and for an input value x between having 3 bits is shown in FIG. 5and where the vertical line 502 indicates the position of the radixpoint.

Consequently, the single summation array is truncated (block 312) beforeit is implemented in the hardware representation (block 322, e.g. bysumming the bits in the different binary weighted columns in thetruncated array). The constant, C, (as defined above) is added back intothe array before producing the final truncated array (e.g. between block312 and block 322 in FIG. 3 ). The formation of the array (in block 311)and the truncation of the array (in block 312) are described in moredetail below. As described above, the hardware representation of thetruncated array which is output by the method of FIG. 3 may be in theform of RTL (e.g. in VHDL), GDSII, etc. This hardware representation maythen be implemented (i.e. fabricated) in hardware (e.g. in silicon) aspart of a filter or other electronic circuit, e.g. a filter which isused in bilinear or trilinear filtering or other forms of imagefiltering.

As described above, the hardware representation of the truncated arraywhich is output by the method of FIG. 3 may be in the form of RTL (e.g.in VHDL), GDSII, etc. This hardware representation may then beimplemented (i.e. fabricated) in hardware (e.g. in silicon) as part of afilter or other electronic circuit, e.g. a filter which is used inbilinear or trilinear filtering or other forms of image filtering.

As part of the array formation (in block 311), all the negative bits(shown as 1 above) are transformed into inverted bits and a constant Zis added, since −x={tilde over (x)}+1. If for various i and j the valueof the recurring bits to be negated is given by:

$\begin{matrix}{{- \frac{1}{2^{m} - 1}}\underset{i,j}{\Sigma}\mspace{11mu} 2^{i}x_{j}} & (5)\end{matrix}$where i ranges from 0 to m−1, and j varies from 0 to n−1 but only someof these terms are present (depending on where negated bits of x are inthe binary array).

The summation in equation (5) is the same as:

${\frac{1}{2^{m} - 1}{\sum\limits_{i,j}{2^{i}{\overset{\_}{x}}_{J}}}} - {\frac{1}{2^{m} - 1}{\sum\limits_{i,j}2^{i}}}$Therefore, all the negated bits in the array can be replaced withinverted bits and the following constant, Z, is computed and then addedinto the array (e.g. as shown in the final part 504 of FIG. 5 ):

$Z = {{- \frac{1}{2^{m} - 1}}{\sum\limits_{i,j}2^{i}}}$For example, in the case of n being 3 and d=21 (m=6):

$Z = {{{- \frac{1}{63}}{\sum\limits_{i = {0{\ldots 2}}}{2^{i}x_{i}}}} = {{\frac{1}{63}{\sum\limits_{i = {0{\ldots 2}}}{2^{i}{\overset{\_}{x}}_{\iota}}}} - \frac{7}{63}}}$So the constant, Z=−7/63=−1+56/63 would need adding into the array(56/63=0.111000111000111000 . . . and in twos complement notation, −1= .. . 111.000000 . . . ).

When truncating the array (in block 312), the maximum value of therepeated section is determined (block 314) and this enables the boundingof the error introduced by truncating the infinite array. As shown inthe example in FIG. 5 , there will be copies of x_(i) and x _(l) invarious columns so there exist positive integers a_(i) and b_(i) suchthat the value of the repeated section, D, can be expressed as follows:

$D = {{{\sum\limits_{i = 0}^{n - 1}\left( {{a_{i}x_{i}} + {b_{i}{\overset{\_}{x}}_{\iota}}} \right)} + k} = {{{\sum\limits_{i = 0}^{n - 1}\left( {{a_{i}x_{i}} - {b_{i}x_{i}}} \right)} + \left( {k + {\sum\limits_{i = 0}^{n - 1}b_{i}}} \right)} = {{\sum\limits_{i = 0}^{n - 1}{\left( {a_{i} - b_{i}} \right)x_{i}}} + \left( {k + {\sum\limits_{i = 0}^{n - 1}b_{i}}} \right)}}}$

We can then separate out those terms when a_(i)−b_(i) is negative andwhen it is positive (i.e. when a_(i)>b_(i)):

$= {{\sum\limits_{\underset{a_{i} > b_{i}}{i = 0}}^{n - 1}{x_{i}\left( {a_{i} - b_{i}} \right)}} + {\sum\limits_{\underset{a_{i}<=b_{i}}{i = 0}}^{n - 1}{x_{i}\left( {a_{i} - b_{i}} \right)}} + \left( {k + {\sum\limits_{i = 0}^{n - 1}b_{i}}} \right)}$The value D_(max) can be calculated by noting that D is maximised bysetting x_(i)=1 when a_(i)>b_(i) and x_(i)=0 otherwise, hence:D _(max)=Σ_(i=0,a) _(i) _(>b) _(i) ^(n-1)(a _(i) −b _(i))+(k+Σ _(i=0)^(n-1) b _(i))  (6)

The result, D_(max), is then weighted by the weight of each section(block 316), where this weight is given by:

$\begin{matrix}\frac{1}{2^{m} - 1} & (7)\end{matrix}$

Using this, the number, r, of whole sections which are retained (block318) is determined by finding the minimum value of r which satisfies:

$\begin{matrix}{\frac{D_{\max}2^{{- r}m}}{2^{m} - 1} \leq {\left( {{2u} - 1} \right)2^{p}}} & (8)\end{matrix}$The smallest such r is:

$\begin{matrix}{r_{\min} = \left\lceil {\frac{1}{m}\left( {\left( {\log_{2}\frac{D_{\max}}{\left( {2^{m} - 1} \right)\left( {{2u} - 1} \right)}} \right) - p} \right)} \right\rceil} & (9)\end{matrix}$where, as detailed above:|ε|≤u2^(p)

Referring to the example shown in FIG. 5 (for d=21, where m=6) and ifu=1 and p=−6:D=2⁰( x ₀ )+2¹ x ₁ +2²( x ₂ +x ₀)+2³(x ₁+1)+2⁴(x ₂+1)+2⁵D=(3x ₀+6x ₁+12x ₂)+63So, using equation (6):D _(max)=(3+6+12)+63=84And, using equation (9):

$r_{\min} = {\left\lceil {\frac{1}{6}\left( {\left( {\log_{2}\frac{84}{\left( {2^{6} - 1} \right)\left( {{2*1} - 1} \right)}} \right) + 6} \right)} \right\rceil = 2}$And in this case r_(min)=2.

Having removed many of the whole sections (in block 318), the truncationmay also discard one or more columns from the last remaining wholesection (in block 320). The value that these discarded columns maycontain must be less than or equal to:

$\begin{matrix}{{\left( {{2u} - 1} \right)2^{p}} - \frac{D_{\max}{2^{- r_{\min}}}^{m}}{2^{m} - 1}} & (10)\end{matrix}$

If D_(i) is the value of the least significant i columns of therepeating section, these values can be computed in a similar fashion toD (e.g. as described above). In the case of d=21 and referring to FIG. 5:

$\mspace{20mu}{D_{1} = {\overset{\_}{x_{0}} = {{- x_{0}} + 1}}}$$\mspace{20mu}{D_{2} = {{{2\overset{\_}{x_{1}}} + \overset{\_}{x_{0}}} = {{- \left( {{2x_{1}} + x_{0}} \right)} + 3}}}$$\mspace{20mu}{D_{3} = {{{4x_{0}} + {4\overset{\_}{x_{2}}} + {2\overset{\_}{x_{1}}} + \overset{\_}{x_{0}}} = {\left( {3x_{0}} \right) - \left( {{4x_{2}} + {2x_{1}}} \right) + 7}}}$$\mspace{20mu}{D_{4} = {{{8x_{1}} + 8 + {4x_{0}} + {4\overset{\_}{x_{2}}} + {2\overset{\_}{x_{1}}} + \overset{\_}{x_{0}}} = {\left( {{6x_{1}} + {3x_{0}}} \right) - \left( {4x_{2}} \right) + {15}}}}$$D_{5} = {{{16x_{2}} + {16} + {8x_{1}} + 8 + {4x_{0}} + {4\overset{\_}{x_{2}}} + {2\overset{\_}{x_{1}}} + \overset{\_}{x_{0}}} = {\left( {{12x_{2}} + {6x_{1}} + {3x_{0}}} \right) + {31}}}$$D_{6} = {{{32} + {16x_{2}} + {16} + {8x_{1}} + 8 + {4x_{0}} + {4\overset{\_}{x_{2}}} + {2\overset{\_}{x_{1}}} + \overset{\_}{x_{0}}} = {\left( {{12x_{2}} + {6x_{1}} + {3x_{0}}} \right) + {63}}}$

The maximum values of these can be calculated in a similar fashion toD_(max):D _(1,max)=1,D _(2,max)=3,D _(3,max)=3−0+7=10D _(4,max)=(6+3)−0+15=24D _(5,max)=(12+6+3)+31=52D _(6,max) =D _(max)=(12+6+3)+63=84

The number of additional columns to truncate having retained only rcopies of repeated section is the largest i such that:

${D_{i,\max}{2^{- r_{\min}}}^{m}} \leq {{\left( {{2u} - 1} \right)2^{p}} - \frac{D_{\max}{2^{- r_{\min}}}^{m}}{2^{m} - 1}}$${D_{i,\max} + \frac{D_{\max}}{2^{m} - 1}} \leq {\left( {{2u} - 1} \right)2^{p + {r_{\min}m}}}$

In the case of d=21, m=6, r_(min)=2, D_(max)=84, u=1, p=−6:

${D_{i,\max} + \frac{84}{63}} \leq 2^{6}$In this case, the maximum i is 5 as 52+84/63≤64.

Having discarded none, one or more columns from the last whole section,in some examples none, one or more bits from the last remaining columnmay also be discarded if this is possible without violating the errorbound.

The truncation (in block 312) may be described as “greedy eating”because bits are discarded starting at the least significant bits (LSBs)until the error bound is reached.

By using the method shown in FIG. 3 and described above, the resultinghardware is smaller and is guaranteed to meet the defined maximum errorrequirement.

In the examples described above, the input x (which is multiplied by theinvariant rational, 1/d, in the hardware representation which isgenerated) is an unsigned number. The method may also be used where x isa signed number. The method operates as described above, with the onlyexception that a negative weight is applied to the most significant bit.This is shown in FIG. 6 which shows the same example as FIG. 5 , exceptthat the input number, x, is a signed twos complement input which cantake negative numbers.

In the examples described above, the invariant rational has the form 1/dwhere d is an odd integer that is greater than one. The methods howevermay be used where the invariant rational has the form P/Q where P and Qare assumed to be coprime integers without loss of generality and Q isnot a power of two. In such examples, equation (4) above is modified tobe:

$\begin{matrix}{\frac{P}{Q} = {\frac{1}{2q}\left( {A + \frac{B}{2^{m} - 1}} \right)}} & (11)\end{matrix}$where A is a positive integer. P/Q is a recurring expansion 414 with arepeating portion B, as shown graphically in the lower part of FIG. 4 .

For example, if P=7 and Q=12, then 7/12 in binary is:

0.10010101010101010101010101010101010101010101010101010101010101 . . .

and it can be seen that after the radix point there is a first ‘A’section ‘10’ followed by a repeating ‘B’ section ‘01’:

0.10|01|01| . . .

Similarly for P=11, Q=12, then 11/12 in binary is:

0.11101010101010101010101010101010101010101010101010101010101010 . . .

and it can be seen that after the radix point there is a first ‘A’section ‘11’ followed by a repeating ‘B’ section ‘10’ (although, asshown by this example, the decomposition of P/Q into sections A and B isnot unique; however, this does not affect the final result):0.11|10|10| . . .Similarly for P=7, Q=22, then 7/22 in binary is:0.01010001011101000101110100010111010001011101000101110100010111 . . .and it can be seen that after the radix point there is a first ‘A’section ‘01’ followed by a repeating ‘B’ section ‘0100010111’:0.01|0100010111|0100010111| . . .

Of these three examples, the first (P/Q=7/12) does not comprise twoadjacent non-zero bits (‘No’ in block 304) so CSD (if used) would notchange the representation, but the other two examples would result in adifferent CSD representation when converted into CSD (in blocks306-310). For an invariant rational of the form P/Q, the truncation (inblock 306) involves taking all the bits from the first ‘A’ section, allthe bits from a plurality of complete repeating sections (e.g. 2repeating sections) and one extra bit from the next section (whenworking from left to right), as shown by bracket 416 in the lower partof FIG. 4 .

Referring to the examples above, the truncation may for examplecomprise, for P=11, Q=12, truncating:

0.11101010101010101010101010101010101010101010101010101010101010 . . .

to be:

0.1110101

and for P=7, Q=22, truncating:

0.01010001011101000101110100010111010001011101000101110100010111 . . .

to be:

0.01010001011101000101110

Taking the example with P=11, Q=12, if binary representation:

0.1110101

is converted into CSD notation, this becomes:

1.0010101

which has a first section 1.0010 followed by a repeating section 10. Asshown in this example, the first ‘B’ section (10) may be altered by thepresence of A (00 following the radix point) and is hence absorbed intothe first section and it is the second copy of B (10) that is replicatedafter CSD is applied. As before, the number of bits in each sectionremain the same as before applying CSD (e.g. 2 bits in A after the radixpoint, 2 bits in the first B section and 2 bits in the next B section).

Taking the example with P=7, Q=22, if binary representation:

0.01010001011101000101110

is converted into CSD notation, this becomes:

0.01010010100101001010010

which has a first section 010100101001 (which is the combination of theA section and the first B section) followed by a repeating section0100101001 (which corresponds to the second B section).

The method then proceeds as described above with reference to FIG. 3 ,except that in the earlier equations q=0, so equations (8)-(10) become:

$\begin{matrix}{\frac{D_{\max}2^{{{- r}m} - q}}{2^{m} - 1} \leq {\left( {{2u} - 1} \right)2^{p}}} & \left( 8^{\prime} \right) \\{r_{\min} = \left\lceil {\frac{1}{m}\left( {\left( {\log_{2}\frac{D_{\max}}{\left( {2^{m} - 1} \right)\left( {{2u} - 1} \right)}} \right) - p - q} \right)} \right\rceil} & \left( 9^{\prime} \right) \\{{\left( {{2u} - 1} \right)2^{p}} - \frac{D_{\max}{2^{- r_{\min}}}^{m - q}}{2^{m} - 1}} & \left( {10} \right)\end{matrix}$

Furthermore, as noted above, due to the conversion into CSDrepresentation, the first recurring B section may differ from thesubsequent B sections. Consequently, when calculating D_(max) (usingequation (6)), this may be calculated for the repeated second B sectionand the combination of the A section and the first B section as a singlespecial preamble.

When performing the truncation (in block 312), it is the repeating ‘B’section which is considered (in blocks 314-318) and not the initial ‘A’section. However, the initial ‘A’ block may, in some examples, bepartially truncated (in block 320, e.g. where r=0 such that all therepeating B sections are discarded).

By using the methods described above (e.g. as shown in FIG. 3 ), ahardware logic design (e.g. in RTL) can be generated which occupies asmaller area when fabricated (e.g. a smaller area of silicon) but stillguarantees to meet a defined error requirement (which may be faithfulrounding of the result of the division operation). This aidsminiaturization of components and the devices (e.g. smartphones, tabletcomputers and other computing devices) in which the components are used.In addition, or instead, it enables more functionality to be implementedwithin a similar area of silicon chip. By reducing the physical size(i.e. area) that is used, more ICs can be fabricated from a singlesilicon wafer, which reduces the overall cost per die.

FIG. 7 illustrates various components of an exemplary computing-baseddevice 700 which may be implemented as any form of a computing and/orelectronic device, and in which embodiments of the methods describedherein may be implemented.

Computing-based device 700 comprises one or more processors 702 whichmay be microprocessors, controllers or any other suitable type ofprocessors for processing computer executable instructions to controlthe operation of the device in order to perform the methods describedherein (e.g. the method of FIG. 3 or FIG. 10 ). In some examples, forexample where a system on a chip architecture is used, the processors702 may include one or more fixed function blocks (also referred to asaccelerators) which implement a part of the method of generating ahardware representation (e.g. RTL) for a constant division operation(which may also be described as multiplication by an invariant rational)in hardware (rather than software or firmware). Platform softwarecomprising an operating system 704 or any other suitable platformsoftware may be provided at the computing-based device to enableapplication software, such as a lossy synthesizer module 706 (whichperforms the method of FIG. 3 ) to be executed on the device.

The computer executable instructions may be provided using anycomputer-readable media that is accessible by computing based device700. Computer-readable media may include, for example, computer storagemedia such as memory 708 and communications media. Computer storagemedia (i.e. non-transitory machine readable media), such as memory 708,includes volatile and non-volatile, removable and non-removable mediaimplemented in any method or technology for storage of information suchas computer readable instructions, data structures, program modules orother data. Computer storage media includes, but is not limited to, RAM,ROM, EPROM, EEPROM, flash memory or other memory technology, CD-ROM,digital versatile disks (DVD) or other optical storage, magneticcassettes, magnetic tape, magnetic disk storage or other magneticstorage devices, or any other non-transmission medium that can be usedto store information for access by a computing device. In contrast,communication media may embody computer readable instructions, datastructures, program modules, or other data in a modulated data signal,such as a carrier wave, or other transport mechanism. As defined herein,computer storage media does not include communication media. Althoughthe computer storage media (i.e. non-transitory machine readable media,e.g. memory 708) is shown within the computing-based device 700 it willbe appreciated that the storage may be distributed or located remotelyand accessed via a network or other communication link (e.g. usingcommunication interface 710).

The computing-based device 700 may also comprise an input/outputcontroller 711 arranged to output display information to a displaydevice 712 which may be separate from or integral to the computing-baseddevice 700. The display information may provide a graphical userinterface. The input/output controller 711 is also arranged to receiveand process input from one or more devices, such as a user input device714 (e.g. a mouse or a keyboard). This user input may be used to specifymaximum error bounds (e.g. for use in the method of FIG. 3 ). In anembodiment the display device 712 may also act as the user input device714 if it is a touch sensitive display device. The input/outputcontroller 711 may also output data to devices other than the displaydevice, e.g. a locally connected printing device (not shown in FIG. 7 ).

The hardware representation of multiplication by a predeterminedinvariant rational described herein may be embodied in hardware on anintegrated circuit using the methods described above. Generally, any ofthe functions, methods, techniques or components described above can beimplemented in software, firmware, hardware (e.g., fixed logiccircuitry), or any combination thereof. The terms “module,”“functionality,” “component”, “element”, “unit”, “block” and “logic” maybe used herein to generally represent software, firmware, hardware, orany combination thereof. In the case of a software implementation, themodule, functionality, component, element, unit, block or logicrepresents program code that performs the specified tasks when executedon a processor. The algorithms and methods described herein could beperformed by one or more processors executing code that causes theprocessor(s) to perform the algorithms/methods. Examples of acomputer-readable storage medium include a random-access memory (RAM),read-only memory (ROM), an optical disc, flash memory, hard disk memory,and other memory devices that may use magnetic, optical, and othertechniques to store instructions or other data and that can be accessedby a machine.

The terms computer program code and computer readable instructions asused herein refer to any kind of executable code for processors,including code expressed in a machine language, an interpreted languageor a scripting language. Executable code includes binary code, machinecode, bytecode, code defining an integrated circuit (such as a hardwaredescription language or netlist), and code expressed in a programminglanguage code such as C, Java or OpenCL. Executable code may be, forexample, any kind of software, firmware, script, module or librarywhich, when suitably executed, processed, interpreted, compiled,executed at a virtual machine or other software environment, cause aprocessor of the computer system at which the executable code issupported to perform the tasks specified by the code.

A processor, computer, or computer system may be any kind of device,machine or dedicated circuit, or collection or portion thereof, withprocessing capability such that it can execute instructions. A processormay be any kind of general purpose or dedicated processor, such as aCPU, GPU, System-on-chip, state machine, media processor, anapplication-specific integrated circuit (ASIC), a programmable logicarray, a field-programmable gate array (FPGA), physics processing units(PPUs), radio processing units (RPUs), digital signal processors (DSPs),general purpose processors (e.g. a general purpose GPU),microprocessors, any processing unit which is designed to acceleratetasks outside of a CPU, etc. A computer or computer system may compriseone or more processors. Those skilled in the art will realize that suchprocessing capabilities are incorporated into many different devices andtherefore the term ‘computer’ includes set top boxes, media players,digital radios, PCs, servers, mobile telephones, personal digitalassistants and many other devices.

It is also intended to encompass software which defines a configurationof hardware as described herein, such as HDL (hardware descriptionlanguage) software, as is used for designing integrated circuits, or forconfiguring programmable chips, to carry out desired functions. That is,there may be provided a computer readable storage medium having encodedthereon computer readable program code in the form of an integratedcircuit definition dataset that when processed in an integrated circuitmanufacturing system configures the system to manufacture an apparatusconfigured to perform any of the methods described herein, or tomanufacture a hardware representation of an operator which performsmultiplication by a predetermined invariant rational. An integratedcircuit definition dataset may be, for example, an integrated circuitdescription.

An integrated circuit definition dataset may be in the form of computercode, for example as a netlist, code for configuring a programmablechip, as a hardware description language defining an integrated circuitat any level, including as register transfer level (RTL) code, ashigh-level circuit representations such as Verilog or VHDL, and aslow-level circuit representations such as OASIS® and GDSII. Higher levelrepresentations which logically define an integrated circuit (such asRTL) may be processed at a computer system configured for generating amanufacturing definition of an integrated circuit in the context of asoftware environment comprising definitions of circuit elements andrules for combining those elements in order to generate themanufacturing definition of an integrated circuit so defined by therepresentation. As is typically the case with software executing at acomputer system so as to define a machine, one or more intermediate usersteps (e.g. providing commands, variables etc.) may be required in orderfor a computer system configured for generating a manufacturingdefinition of an integrated circuit to execute code defining anintegrated circuit so as to generate the manufacturing definition ofthat integrated circuit.

An example of processing an integrated circuit definition dataset at anintegrated circuit manufacturing system so as to configure the system tomanufacture a hardware implementation of an operator which performsmultiplication by a predetermined invariant rational will now bedescribed with respect to FIG. 8 .

FIG. 8 shows an example of an integrated circuit (IC) manufacturingsystem 802 which comprises a layout processing system 804 and anintegrated circuit generation system 806. The IC manufacturing system802 is configured to receive an IC definition dataset (e.g. defining ahardware implementation of an operator which performs multiplication bya predetermined invariant rational as described in any of the examplesherein), process the IC definition dataset, and generate an IC accordingto the IC definition dataset (e.g. which embodies a hardwareimplementation of an operator which performs multiplication by apredetermined invariant rational as described in any of the examplesherein). The processing of the IC definition dataset configures the ICmanufacturing system 802 to manufacture an integrated circuit embodyinga hardware implementation of an operator which performs multiplicationby a predetermined invariant rational as described in any of theexamples herein.

The layout processing system 804 is configured to receive and processthe IC definition dataset to determine a circuit layout. Methods ofdetermining a circuit layout from an IC definition dataset are known inthe art, and for example may involve synthesising RTL code to determinea gate level representation of a circuit to be generated, e.g. in termsof logical components (e.g. NAND, NOR, AND, OR, MUX and FLIP-FLOPcomponents). A circuit layout can be determined from the gate levelrepresentation of the circuit by determining positional information forthe logical components. This may be done automatically or with userinvolvement in order to optimise the circuit layout. When the layoutprocessing system 804 has determined the circuit layout it may output acircuit layout definition to the IC generation system 806. A circuitlayout definition may be, for example, a circuit layout description.

The IC generation system 806 generates an IC according to the circuitlayout definition, as is known in the art. For example, the ICgeneration system 806 may implement a semiconductor device fabricationprocess to generate the IC, which may involve a multiple-step sequenceof photo lithographic and chemical processing steps during whichelectronic circuits are gradually created on a wafer made ofsemiconducting material. The circuit layout definition may be in theform of a mask which can be used in a lithographic process forgenerating an IC according to the circuit definition. Alternatively, thecircuit layout definition provided to the IC generation system 806 maybe in the form of computer-readable code which the IC generation system806 can use to form a suitable mask for use in generating an IC.

The different processes performed by the IC manufacturing system 802 maybe implemented all in one location, e.g. by one party. Alternatively,the IC manufacturing system 802 may be a distributed system such thatsome of the processes may be performed at different locations, and maybe performed by different parties. For example, some of the stages of:(i) synthesising RTL code representing the IC definition dataset to forma gate level representation of a circuit to be generated, (ii)generating a circuit layout based on the gate level representation,(iii) forming a mask in accordance with the circuit layout, and (iv)fabricating an integrated circuit using the mask, may be performed indifferent locations and/or by different parties.

In other examples, processing of the integrated circuit definitiondataset at an integrated circuit manufacturing system may configure thesystem to manufacture an operator which performs multiplication by apredetermined invariant rational without the IC definition dataset beingprocessed so as to determine a circuit layout. For instance, anintegrated circuit definition dataset may define the configuration of areconfigurable processor, such as an FPGA, and the processing of thatdataset may configure an IC manufacturing system to generate areconfigurable processor having that defined configuration (e.g. byloading configuration data to the FPGA).

In some embodiments, an integrated circuit manufacturing definitiondataset, when processed in an integrated circuit manufacturing system,may cause an integrated circuit manufacturing system to generate adevice as described herein. For example, the configuration of anintegrated circuit manufacturing system in the manner described abovewith respect to FIG. 8 by an integrated circuit manufacturing definitiondataset may cause a device as described herein to be manufactured.

In some examples, an integrated circuit definition dataset could includesoftware which runs on hardware defined at the dataset or in combinationwith hardware defined at the dataset. In the example shown in FIG. 8 ,the IC generation system may further be configured by an integratedcircuit definition dataset to, on manufacturing an integrated circuit,load firmware onto that integrated circuit in accordance with programcode defined at the integrated circuit definition dataset or otherwiseprovide program code with the integrated circuit for use with theintegrated circuit.

Those skilled in the art will realize that storage devices utilized tostore program instructions can be distributed across a network. Forexample, a remote computer may store an example of the process describedas software. A local or terminal computer may access the remote computerand download a part or all of the software to run the program.Alternatively, the local computer may download pieces of the software asneeded, or execute some software instructions at the local terminal andsome at the remote computer (or computer network). Those skilled in theart will also realize that by utilizing conventional techniques known tothose skilled in the art that all, or a portion of the softwareinstructions may be carried out by a dedicated circuit, such as a DSP,programmable logic array, or the like.

The methods described herein may be performed by a computer configuredwith software in machine readable form stored on a tangible storagemedium e.g. in the form of a computer program comprising computerreadable program code for configuring a computer to perform theconstituent portions of described methods or in the form of a computerprogram comprising computer program code means adapted to perform allthe steps of any of the methods described herein when the program is runon a computer and where the computer program may be embodied on acomputer readable storage medium. Examples of tangible (ornon-transitory) storage media include disks, thumb drives, memory cardsetc. and do not include propagated signals. The software can be suitablefor execution on a parallel processor or a serial processor such thatthe method steps may be carried out in any suitable order, orsimultaneously.

The hardware components described herein may be generated by anon-transitory computer readable storage medium having encoded thereoncomputer readable program code.

Memories storing machine executable data for use in implementingdisclosed aspects can be non-transitory media. Non-transitory media canbe volatile or non-volatile. Examples of volatile non-transitory mediainclude semiconductor-based memory, such as SRAM or DRAM. Examples oftechnologies that can be used to implement non-volatile memory includeoptical and magnetic memory technologies, flash memory, phase changememory, resistive RAM.

A particular reference to “logic” refers to structure that performs afunction or functions. An example of logic includes circuitry that isarranged to perform those function(s). For example, such circuitry mayinclude transistors and/or other hardware elements available in amanufacturing process. Such transistors and/or other elements may beused to form circuitry or structures that implement and/or containmemory, such as registers, flip flops, or latches, logical operators,such as Boolean operations, mathematical operators, such as adders,multipliers, or shifters, and interconnect, by way of example. Suchelements may be provided as custom circuits or standard cell libraries,macros, or at other levels of abstraction. Such elements may beinterconnected in a specific arrangement. Logic may include circuitrythat is fixed function and circuitry can be programmed to perform afunction or functions; such programming may be provided from a firmwareor software update or control mechanism. Logic identified to perform onefunction may also include logic that implements a constituent functionor sub-process. In an example, hardware logic has circuitry thatimplements a fixed function operation, or operations, state machine orprocess.

Any range or device value given herein may be extended or alteredwithout losing the effect sought, as will be apparent to the skilledperson.

It will be understood that the benefits and advantages described abovemay relate to one embodiment or may relate to several embodiments. Theembodiments are not limited to those that solve any or all of the statedproblems or those that have any or all of the stated benefits andadvantages.

Any reference to ‘an’ item refers to one or more of those items. Theterm ‘comprising’ is used herein to mean including the method blocks orelements identified, but that such blocks or elements do not comprise anexclusive list and an apparatus may contain additional blocks orelements and a method may contain additional operations or elements.Furthermore, the blocks, elements and operations are themselves notimpliedly closed.

The steps of the methods described herein may be carried out in anysuitable order, or simultaneously where appropriate. The arrows betweenboxes in the figures show one example sequence of method steps but arenot intended to exclude other sequences or the performance of multiplesteps in parallel. Additionally, individual blocks may be deleted fromany of the methods without departing from the spirit and scope of thesubject matter described herein. Aspects of any of the examplesdescribed above may be combined with aspects of any of the otherexamples described to form further examples without losing the effectsought. Where elements of the figures are shown connected by arrows, itwill be appreciated that these arrows show just one example flow ofcommunications (including data and control messages) between elements.The flow between elements may be in either direction or in bothdirections.

The applicant hereby discloses in isolation each individual featuredescribed herein and any combination of two or more such features, tothe extent that such features or combinations are capable of beingcarried out based on the present specification as a whole in the lightof the common general knowledge of a person skilled in the art,irrespective of whether such features or combinations of features solveany problems disclosed herein. In view of the foregoing description itwill be evident to a person skilled in the art that variousmodifications may be made within the scope of the invention.

What is claimed is:
 1. A method of synthesizing a representation of a hardware logic multiplier configured to multiply an input value by a predetermined invariant rational that satisfies a defined error bound, wherein the method is performed by at least one processor, and the method comprising, by at least one processor: truncating a binary expansion of the predetermined invariant rational; converting the truncated binary expansion into canonical signed digit notation and expanding the canonical signed digit representation into a finite representation of an infinite expansion; generating a truncated single summation array from the infinite expansion by discarding one or more repeating sections of the array based upon the defined error bound; and synthesizing the representation of the hardware logic multiplier using said truncated single summation array.
 2. The method according to claim 1, further comprising: determining the binary expansion of the predetermined invariant rational.
 3. The method according to claim 1, wherein generating a truncated single summation array from the infinite expansion by discarding one or more repeating sections of the array comprises: determining a maximum binary value of a repeating section in a finite representation of an infinite single summation array generated from the infinite expansion; weighting the maximum binary value by a weight of each section; and calculating a minimum number of whole repeating sections to be retained within the truncated single summation array to satisfy the defined error bound.
 4. The method according to claim 3, wherein generating a truncated single summation array from the infinite expansion by discarding one or more repeating sections of the array further comprises: identifying one or more bits from a retained whole repeating section that can be discarded from the truncated single summation array whilst satisfying the defined error bound.
 5. The method according to claim 1, further comprising: fabricating the hardware logic multiplier.
 6. The method according to claim 5, wherein the hardware logic multiplier is fabricated in silicon.
 7. A non-transitory computer readable storage medium having stored thereon computer executable instructions to synthesize a representation of a hardware logic multiplier, the computer executable instructions being arranged, when executed by a processor, to cause the processor to: truncate a binary expansion of a predetermined invariant rational, convert the truncated binary expansion into canonical signed digit notation and expand the canonical signed digit representation into a finite representation of an infinite expansion; generate a truncated single summation array from the infinite expansion by discarding one or more repeating sections of the array based upon a defined error bound; and synthesize the representation of the hardware logic multiplier using said truncated single summation array.
 8. The non-transitory computer readable storage medium according to claim 7, wherein the hardware logic multiplier is a hardware logic implementation of an operation to multiply an input value by the predetermined invariant rational that satisfies the defined error bound.
 9. A hardware logic multiplier configured to multiply an input value by a predetermined invariant rational that satisfies a defined error bound, wherein the hardware logic multiplier is synthesized using a process comprising: truncating a binary expansion of the predetermined invariant rational; converting the truncated binary expansion into canonical signed digit notation and expanding the canonical signed digit representation into a finite representation of an infinite expansion; generating a truncated single summation array from the infinite expansion by discarding one or more repeating sections of the array based upon the defined error bound; and synthesizing the hardware logic multiplier using said truncated single summation array.
 10. The hardware logic multiplier according to claim 9, wherein the process further comprises: determining the binary expansion of the predetermined invariant rational.
 11. The hardware logic multiplier according to claim 9, wherein generating a truncated single summation array from the infinite expansion by discarding one or more repeating sections of the array comprises: determining a maximum binary value of a repeating section in a finite representation of an infinite single summation array generated from the infinite expansion; weighting the maximum binary value by a weight of each section; and calculating a minimum number of whole repeating sections to be retained within the truncated single summation array to satisfy the defined error bound.
 12. The hardware logic multiplier according to claim 11, wherein generating a truncated single summation array from the infinite expansion by discarding one or more repeating sections of the array further comprises: identifying one or more bits from a retained whole repeating section that can be discarded from the truncated single summation array whilst satisfying the defined error bound.
 13. The hardware logic multiplier according to claim 9, wherein the hardware logic multiplier is fabricated in silicon. 